/*************************************************************************
	> File Name: main.cc
	> Author: Joker
	> Mail: mahongtao@foxmail.com 
	> Created Time: 2020-09-22 18:26:38
 ************************************************************************/

#include "State.h"

#include <iostream>
using namespace std;

void test0(){
    State * pState1 = new ConcreateStateA();
    Context * pContext = new Context(pState1);

    pContext->Request();
    pContext->Request();
    /* pContext->Request(); */

    State * pState2 = new ConcreateStateB();

    pContext->ChangeState(pState2);
    pContext->Request();

    delete pContext;

}

int main(int argc,char *argv[])
{
    test0();
    return 0;
}
